<?php
class AlbumController extends Zend_Controller_Action
{
	public function listeralbumAction()
    {
    	$photo = new Table_Photos();
		$vip = new Table_Vips();
		$resu = array();
		$resu_vip = $vip -> getAllNumVip();
		foreach ($resu_vip as $ligne)
		{
			$resu[] = $photo -> getPhoto(1, $ligne -> vip_numero);
		}
		
		$VIP_NUMERO = $this -> getParam('VIP_NUMERO');
		$PHOTO_NUMERO = $this -> getParam('PHOTO_NUMERO');
		
		if ($VIP_NUMERO != null && $PHOTO_NUMERO != null)
		{
			$resu2 = $photo -> getPhoto($PHOTO_NUMERO, $VIP_NUMERO);
		}
		else
		{
			$resu2 = null;
		}
		
		
		$this -> view -> listeralbum = array('vips' => $resu, 'photoselec' => $resu2);
    }
}
?>